-- Start of DDL Script for Table BRIDGE.FBI_COLUMN
-- Generated 18.09.2013 12:21:53 from BRIDGE@lcnp

CREATE TABLE bridge.fbi_column
    (id                             NUMBER NOT NULL,
    table_schema                   VARCHAR2(30) NOT NULL,
    table_name                     VARCHAR2(30) NOT NULL,
    column_name                    VARCHAR2(30) NOT NULL,
    column_type                    VARCHAR2(30) NOT NULL,
    column_comment                 VARCHAR2(4000),
    not_null                       NUMBER DEFAULT 0 NOT NULL
  ,
  PRIMARY KEY (id)
  USING INDEX
  TABLESPACE  idx)
  TABLESPACE  users
/





-- Triggers for BRIDGE.FBI_COLUMN

CREATE TRIGGER bridge.FBI_COLUMN_SEQ
 BEFORE 
 INSERT
 ON bridge.FBI_COLUMN
 REFERENCING OLD AS OLD NEW AS NEW
 FOR EACH ROW
BEGIN
   IF :NEW.ID IS NULL OR :NEW.ID = 0
   THEN
      SELECT sq_fbi_column.NEXTVAL
        INTO :NEW.ID
        FROM DUAL;
   END IF;
END;
/


-- End of DDL Script for Table BRIDGE.FBI_COLUMN

